package com.sinry.api.aggregation.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 接口文档注册表
 * @TableName sinry_api_register
 */
@TableName(value ="sinry_api_register")
@Data
public class ApiRegister implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 文档名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 服务名称,代表需要聚合的服务
     */
    @TableField(value = "service_name")
    private String serviceName;

    /**
     * 网关路径
     */
    @TableField(value = "service_path")
    private String servicePath;

    /**
     * api-doc接口地址
     */
    @TableField(value = "location")
    private String location;

    /**
     * swagger版本
     */
    @TableField(value = "swagger_version")
    private String swaggerVersion;

    /**
     * nacos服务分组名称
     */
    @TableField(value = "group_name")
    private String groupName;

    /**
     * nacos服务命名空间id
     */
    @TableField(value = "namespace_id")
    private String namespaceId;

    /**
     * 集群名称,多个集群用逗号分隔
     */
    @TableField(value = "clusters")
    private String clusters;

    /**
     * 是否开启接口验证：1是 0否
     */
    @TableField(value = "basic_auth_enable")
    private Integer basicAuthEnable;

    /**
     * basic用户名
     */
    @TableField(value = "basic_username")
    private String basicUsername;

    /**
     * basic密码
     */
    @TableField(value = "basic_password")
    private String basicPassword;

    /**
     * 文档排序
     */
    @TableField(value = "`order`")
    private Integer order;
}